home *** CD-ROM | disk | FTP | other *** search
/ Clickx 53 / Clickx 53.iso / software / onmisbaretool / feedreaderv313 / udf / ib_udf2.sql < prev   
Encoding:
Text File  |  2008-01-01  |  19.8 KB  |  726 lines

  1. /*
  2.  * The contents of this file are subject to the Interbase Public
  3.  * License Version 1.0 (the "License"); you may not use this file
  4.  * except in compliance with the License. You may obtain a copy
  5.  * of the License at http://www.Inprise.com/IPL.html
  6.  *
  7.  * Software distributed under the License is distributed on an
  8.  * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
  9.  * or implied. See the License for the specific language governing
  10.  * rights and limitations under the License.
  11.  *
  12.  * The Original Code was created by Inprise Corporation
  13.  * and its predecessors. Portions created by Inprise Corporation are
  14.  * Copyright (C) Inprise Corporation.
  15.  *
  16.  * All Rights Reserved.
  17.  * Contributor(s): ______________________________________.
  18.  * Revision 1.2  2000/11/28 06:47:52  fsg
  19.  * Changed declaration of ascii_char in ib_udf.sql
  20.  * to get correct result as proposed by Claudio Valderrama
  21.  * 2001.5.19 Claudio Valderrama, add the declaration of alternative
  22.  * substrlen function to handle string,start,length instead.
  23.  * 2004.9.1 Claudio Valderrama, changed some UDF's to be able to detect NULL
  24.  * and renamed the resulting file as ib_udf2.sql.
  25.  *
  26.  */
  27. /*****************************************
  28.  *
  29.  *    a b s
  30.  *
  31.  *****************************************
  32.  *
  33.  * Functional description:
  34.  *     Returns the absolute value of a 
  35.  *     number.  
  36.  *
  37.  *****************************************/
  38. DECLARE EXTERNAL FUNCTION abs 
  39.     DOUBLE PRECISION
  40.     RETURNS DOUBLE PRECISION BY VALUE
  41.     ENTRY_POINT 'IB_UDF_abs' MODULE_NAME 'ib_udf';
  42.  
  43. /*****************************************
  44.  *
  45.  *    a c o s
  46.  *
  47.  *****************************************
  48.  *
  49.  * Functional description:
  50.  *    Returns the arccosine of a number 
  51.  *    between -1 and 1, if the number is
  52.  *    out of bounds it returns NaN, as handled
  53.  *    by the _matherr routine.
  54.  *
  55.  *****************************************/
  56. DECLARE EXTERNAL FUNCTION acos 
  57.     DOUBLE PRECISION
  58.     RETURNS DOUBLE PRECISION BY VALUE
  59.     ENTRY_POINT 'IB_UDF_acos' MODULE_NAME 'ib_udf';
  60.  
  61. /*****************************************
  62.  *
  63.  *    a s c i i _ c h a r
  64.  *
  65.  *****************************************
  66.  *
  67.  * Functional description:
  68.  *    Returns the ASCII character corresponding
  69.  *    with the value passed in.
  70.  *
  71.  *****************************************/
  72. DECLARE EXTERNAL FUNCTION ascii_char
  73.     INTEGER NULL
  74.     RETURNS CSTRING(1) FREE_IT
  75.     ENTRY_POINT 'IB_UDF_ascii_char' MODULE_NAME 'ib_udf';
  76.  
  77. /*****************************************
  78.  *
  79.  *    a s c i i _ v a l
  80.  *
  81.  *****************************************
  82.  *
  83.  * Functional description:
  84.  *    Returns the ascii value of the character
  85.  *     passed in.
  86.  *
  87.  *****************************************/
  88. DECLARE EXTERNAL FUNCTION ascii_val
  89.     CHAR(1)
  90.     RETURNS INTEGER BY VALUE
  91.     ENTRY_POINT 'IB_UDF_ascii_val' MODULE_NAME 'ib_udf';
  92.  
  93. /*****************************************
  94.  *
  95.  *    a s i n
  96.  *
  97.  *****************************************
  98.  *
  99.  * Functional description:
  100.  *    Returns the arcsin of a number between
  101.  *    -1 and 1, if the number is out of
  102.  *    range NaN is returned.
  103.  *
  104.  *****************************************/
  105. DECLARE EXTERNAL FUNCTION asin 
  106.     DOUBLE PRECISION
  107.     RETURNS DOUBLE PRECISION BY VALUE
  108.     ENTRY_POINT 'IB_UDF_asin' MODULE_NAME 'ib_udf';
  109.  
  110. /*****************************************
  111.  *
  112.  *    a t a n
  113.  *
  114.  *****************************************
  115.  *
  116.  * Functional description:
  117.  *    Returns the arctangent of a number.
  118.  *    
  119.  *
  120.  *****************************************/
  121. DECLARE EXTERNAL FUNCTION atan 
  122.     DOUBLE PRECISION
  123.     RETURNS DOUBLE PRECISION BY VALUE
  124.     ENTRY_POINT 'IB_UDF_atan' MODULE_NAME 'ib_udf';
  125.  
  126. /*****************************************
  127.  *
  128.  *    a t a n 2
  129.  *
  130.  *****************************************
  131.  *
  132.  * Functional description:
  133.  *     Returns the arctangent of the
  134.  *    first param / the second param.
  135.  *
  136.  *****************************************/
  137. DECLARE EXTERNAL FUNCTION atan2 
  138.     DOUBLE PRECISION, DOUBLE PRECISION
  139.     RETURNS DOUBLE PRECISION BY VALUE
  140.     ENTRY_POINT 'IB_UDF_atan2' MODULE_NAME 'ib_udf';
  141.  
  142. /*****************************************
  143.  *
  144.  *    b i n _ a n d
  145.  *
  146.  *****************************************
  147.  *
  148.  * Functional description:
  149.  *    Returns the result of a binary AND 
  150.  *    operation performed on the two numbers.
  151.  *
  152.  *****************************************/
  153. DECLARE EXTERNAL FUNCTION bin_and 
  154.     INTEGER, INTEGER
  155.     RETURNS INTEGER BY VALUE
  156.     ENTRY_POINT 'IB_UDF_bin_and' MODULE_NAME 'ib_udf';
  157.  
  158. /*****************************************
  159.  *
  160.  *    b i n _ o r
  161.  *
  162.  *****************************************
  163.  *
  164.  * Functional description:
  165.  *    Returns the result of a binary OR 
  166.  *    operation performed on the two numbers.
  167.  *
  168.  *****************************************/
  169. DECLARE EXTERNAL FUNCTION bin_or 
  170.     INTEGER, INTEGER
  171.     RETURNS INTEGER BY VALUE
  172.     ENTRY_POINT 'IB_UDF_bin_or' MODULE_NAME 'ib_udf';
  173.  
  174. /*****************************************
  175.  *
  176.  *    b i n _ x o r
  177.  *
  178.  *****************************************
  179.  *
  180.  * Functional description:
  181.  *    Returns the result of a binary XOR 
  182.  *    operation performed on the two numbers.
  183.  *
  184.  *****************************************/
  185. DECLARE EXTERNAL FUNCTION bin_xor 
  186.     INTEGER, INTEGER
  187.     RETURNS INTEGER BY VALUE
  188.     ENTRY_POINT 'IB_UDF_bin_xor' MODULE_NAME 'ib_udf';
  189.  
  190. /*****************************************
  191.  *
  192.  *    c e i l i n g
  193.  *
  194.  *****************************************
  195.  *
  196.  * Functional description:
  197.  *    Returns a double value representing 
  198.  *    the smallest integer that is greater 
  199.  *    than or equal to the input value.
  200.  *
  201.  *****************************************/
  202. DECLARE EXTERNAL FUNCTION ceiling 
  203.     DOUBLE PRECISION
  204.     RETURNS DOUBLE PRECISION BY VALUE
  205.     ENTRY_POINT 'IB_UDF_ceiling' MODULE_NAME 'ib_udf';
  206.  
  207. /*****************************************
  208.  *
  209.  *    c o s
  210.  *
  211.  *****************************************
  212.  *
  213.  * Functional description:
  214.  *    The cos function returns the cosine 
  215.  *    of x. If x is greater than or equal 
  216.  *    to 263, or less than or equal to -263, 
  217.  *    a loss of significance in the result 
  218.  *    of a call to cos occurs, in which case 
  219.  *    the function generates a _TLOSS error 
  220.  *    and returns an indefinite (same as a 
  221.  *    quiet NaN).
  222.  *
  223.  *****************************************/
  224. DECLARE EXTERNAL FUNCTION cos 
  225.     DOUBLE PRECISION
  226.     RETURNS DOUBLE PRECISION BY VALUE
  227.     ENTRY_POINT 'IB_UDF_cos' MODULE_NAME 'ib_udf';
  228.  
  229. /*****************************************
  230.  *
  231.  *    c o s h
  232.  *
  233.  *****************************************
  234.  *
  235.  * Functional description:
  236.  *    The cosh function returns the hyperbolic cosine 
  237.  *    of x. If x is greater than or equal 
  238.  *    to 263, or less than or equal to -263, 
  239.  *    a loss of significance in the result 
  240.  *    of a call to cos occurs, in which case 
  241.  *    the function generates a _TLOSS error 
  242.  *    and returns an indefinite (same as a 
  243.  *    quiet NaN).
  244.  *
  245.  *****************************************/
  246. DECLARE EXTERNAL FUNCTION cosh 
  247.     DOUBLE PRECISION
  248.     RETURNS DOUBLE PRECISION BY VALUE
  249.     ENTRY_POINT 'IB_UDF_cosh' MODULE_NAME 'ib_udf';
  250.  
  251. /*****************************************
  252.  *
  253.  *    c o t
  254.  *
  255.  *****************************************
  256.  *
  257.  * Functional description:
  258.  *    Returns 1 over the tangent of the
  259.  *    input parameter.
  260.  *
  261.  *****************************************/
  262. DECLARE EXTERNAL FUNCTION cot 
  263.     DOUBLE PRECISION
  264.     RETURNS DOUBLE PRECISION BY VALUE
  265.     ENTRY_POINT 'IB_UDF_cot' MODULE_NAME 'ib_udf';
  266.  
  267. /*****************************************
  268.  *
  269.  *    d i v
  270.  *
  271.  *****************************************
  272.  *
  273.  * Functional description:
  274.  *    Returns the quotient part of the division
  275.  *    of the two input parameters.
  276.  *
  277.  *****************************************/
  278. DECLARE EXTERNAL FUNCTION div 
  279.     INTEGER, INTEGER
  280.     RETURNS DOUBLE PRECISION BY VALUE
  281.     ENTRY_POINT 'IB_UDF_div' MODULE_NAME 'ib_udf';
  282.  
  283. /*****************************************
  284.  *
  285.  *    f l o o r
  286.  *
  287.  *****************************************
  288.  *
  289.  * Functional description:
  290.  *     Returns a floating-point value 
  291.  *     representing the largest integer that 
  292.  *    is less than or equal to x    
  293.  *
  294.  *****************************************/
  295. DECLARE EXTERNAL FUNCTION floor 
  296.     DOUBLE PRECISION
  297.     RETURNS DOUBLE PRECISION BY VALUE
  298.     ENTRY_POINT 'IB_UDF_floor' MODULE_NAME 'ib_udf';
  299.  
  300. /*****************************************
  301.  *
  302.  *    f r a c
  303.  *
  304.  *****************************************
  305.  *
  306.  * Functional description:
  307.  *     Returns the fractional part of the argument.
  308.  *
  309.  *****************************************/
  310. DECLARE EXTERNAL FUNCTION frac
  311.     DOUBLE PRECISION
  312.     RETURNS DOUBLE PRECISION BY VALUE
  313.     ENTRY_POINT 'IB_UDF_frac' MODULE_NAME 'ib_udf';
  314.  
  315. /*****************************************
  316.  *
  317.  *    l n
  318.  *
  319.  *****************************************
  320.  *
  321.  * Functional description:
  322.  *    Returns the natural log of a number.
  323.  *
  324.  *****************************************/
  325. DECLARE EXTERNAL FUNCTION ln 
  326.     DOUBLE PRECISION
  327.     RETURNS DOUBLE PRECISION BY VALUE
  328.     ENTRY_POINT 'IB_UDF_ln' MODULE_NAME 'ib_udf';
  329.  
  330. /*****************************************
  331.  *
  332.  *    l o g
  333.  *
  334.  *****************************************
  335.  *
  336.  * Functional description:
  337.  *    log (x,y) returns the logarithm 
  338.  *    base x of y.
  339.  *
  340.  *****************************************/
  341. DECLARE EXTERNAL FUNCTION log 
  342.     DOUBLE PRECISION, DOUBLE PRECISION
  343.     RETURNS DOUBLE PRECISION BY VALUE
  344.     ENTRY_POINT 'IB_UDF_log' MODULE_NAME 'ib_udf';
  345.  
  346. /*****************************************
  347.  *
  348.  *    l o g 1 0
  349.  *
  350.  *****************************************
  351.  *
  352.  * Functional description:
  353.  *    Returns the logarithm base 10 of the
  354.  *    input parameter.
  355.  *
  356.  *****************************************/
  357. DECLARE EXTERNAL FUNCTION log10 
  358.     DOUBLE PRECISION
  359.     RETURNS DOUBLE PRECISION BY VALUE
  360.     ENTRY_POINT 'IB_UDF_log10' MODULE_NAME 'ib_udf';
  361.  
  362. /*****************************************
  363.  *
  364.  *    l o w e r
  365.  *
  366.  *****************************************
  367.  *
  368.  * Functional description:
  369.  *    Returns the input string into lower 
  370.  *    case characters.  Note: This function
  371.  *    will not work with international and 
  372.  *    non-ascii characters.
  373.  *    Note: This function is NOT limited to
  374.  *    receiving and returning only 255 characters,
  375.  *    rather, it can use as long as 32767 
  376.  *     characters which is the limit on an 
  377.  *    INTERBASE character string.
  378.  *
  379.  *****************************************/
  380. DECLARE EXTERNAL FUNCTION "LOWER"
  381.     CSTRING(255) NULL
  382.     RETURNS CSTRING(255) FREE_IT
  383.     ENTRY_POINT 'IB_UDF_lower' MODULE_NAME 'ib_udf';
  384.  
  385. /*****************************************
  386.  *
  387.  *    l p a d
  388.  *
  389.  *****************************************
  390.  *
  391.  * Functional description:
  392.  *    Appends the given character to beginning
  393.  *    of the input string until length of the result
  394.  *    string becomes equal to the given number.
  395.  *    Note: This function is NOT limited to
  396.  *    receiving and returning only 255 characters,
  397.  *    rather, it can use as long as 32767 
  398.  *     characters which is the limit on an 
  399.  *    INTERBASE character string.
  400.  *
  401.  *****************************************/
  402. DECLARE EXTERNAL FUNCTION lpad 
  403.     CSTRING(255) NULL, INTEGER, CSTRING(1) NULL
  404.     RETURNS CSTRING(255) FREE_IT
  405.     ENTRY_POINT 'IB_UDF_lpad' MODULE_NAME 'ib_udf';
  406.  
  407. /*****************************************
  408.  *
  409.  *    l t r i m
  410.  *
  411.  *****************************************
  412.  *
  413.  * Functional description:
  414.  *    Removes leading spaces from the input
  415.  *    string.
  416.  *    Note: This function is NOT limited to
  417.  *    receiving and returning only 255 characters,
  418.  *    rather, it can use as long as 32767 
  419.  *     characters which is the limit on an 
  420.  *    INTERBASE character string.
  421.  *
  422.  *****************************************/
  423. DECLARE EXTERNAL FUNCTION ltrim 
  424.     CSTRING(255) NULL
  425.     RETURNS CSTRING(255) FREE_IT
  426.     ENTRY_POINT 'IB_UDF_ltrim' MODULE_NAME 'ib_udf';
  427.  
  428. /*****************************************
  429.  *
  430.  *    m o d
  431.  *
  432.  *****************************************
  433.  *
  434.  * Functional description:
  435.  *    Returns the remainder part of the 
  436.  *    division of the two input parameters.
  437.  *
  438.  *****************************************/
  439. DECLARE EXTERNAL FUNCTION mod 
  440.     INTEGER, INTEGER
  441.     RETURNS DOUBLE PRECISION BY VALUE
  442.     ENTRY_POINT 'IB_UDF_mod' MODULE_NAME 'ib_udf';
  443.  
  444. /*****************************************
  445.  *
  446.  *    p i
  447.  *
  448.  *****************************************
  449.  *
  450.  * Functional description:
  451.  *    Returns the value of pi = 3.1459...
  452.  *
  453.  *****************************************/
  454. DECLARE EXTERNAL FUNCTION pi 
  455.     RETURNS DOUBLE PRECISION BY VALUE
  456.     ENTRY_POINT 'IB_UDF_pi' MODULE_NAME 'ib_udf';
  457.  
  458. /*****************************************
  459.  *
  460.  *    r a n d
  461.  *
  462.  *****************************************
  463.  *
  464.  * Functional description:
  465.  *    Returns a random number between 0 
  466.  *    and 1.  
  467.  * 
  468.  * Note: The rand() function was changed
  469.  *  in Firebird 2.0 so that the seed value
  470.  *  is not set by every call. This corrects
  471.  *  a potential duplicate value problem and
  472.  *  ensures that different values will
  473.  *  always be returned.
  474.  *
  475.  *  To seed the random number generator or
  476.  *  retain the old behaviour, use srand(). 
  477.  *
  478.  *****************************************/
  479. DECLARE EXTERNAL FUNCTION rand 
  480.     RETURNS DOUBLE PRECISION BY VALUE
  481.     ENTRY_POINT 'IB_UDF_rand' MODULE_NAME 'ib_udf';
  482.  
  483.  
  484. /*****************************************
  485.  *
  486.  *    r p a d
  487.  *
  488.  *****************************************
  489.  *
  490.  * Functional description:
  491.  *    Appends the given character to end
  492.  *    of the input string until length of the result
  493.  *    string becomes equal to the given number.
  494.  *    Note: This function is NOT limited to
  495.  *    receiving and returning only 255 characters,
  496.  *    rather, it can use as long as 32767 
  497.  *     characters which is the limit on an 
  498.  *    INTERBASE character string.
  499.  *
  500.  *****************************************/
  501. DECLARE EXTERNAL FUNCTION rpad 
  502.     CSTRING(255) NULL, INTEGER, CSTRING(1) NULL
  503.     RETURNS CSTRING(255) FREE_IT
  504.     ENTRY_POINT 'IB_UDF_rpad' MODULE_NAME 'ib_udf';
  505.  
  506. /*****************************************
  507.  *
  508.  *    r t r i m
  509.  *
  510.  *****************************************
  511.  *
  512.  * Functional description:
  513.  *    Removes trailing spaces from the input
  514.  *    string.
  515.  *    Note: This function is NOT limited to
  516.  *    receiving and returning only 255 characters,
  517.  *    rather, it can use as long as 32767 
  518.  *     characters which is the limit on an 
  519.  *    INTERBASE character string.
  520.  *
  521.  *****************************************/
  522. DECLARE EXTERNAL FUNCTION rtrim 
  523.     CSTRING(255) NULL
  524.     RETURNS CSTRING(255) FREE_IT
  525.     ENTRY_POINT 'IB_UDF_rtrim' MODULE_NAME 'ib_udf';
  526.  
  527. /*****************************************
  528.  *
  529.  *    s i g n
  530.  *
  531.  *****************************************
  532.  *
  533.  * Functional description:
  534.  *    Returns 1, 0, or -1 depending on whether
  535.  *     the input value is positive, zero or 
  536.  *    negative, respectively.
  537.  *
  538.  *****************************************/
  539. DECLARE EXTERNAL FUNCTION sign 
  540.     DOUBLE PRECISION
  541.     RETURNS INTEGER BY VALUE
  542.     ENTRY_POINT 'IB_UDF_sign' MODULE_NAME 'ib_udf';
  543.  
  544. /*****************************************
  545.  *
  546.  *    s i n
  547.  *
  548.  *****************************************
  549.  *
  550.  * Functional description:
  551.  *    Returns the sine of x. If x is greater 
  552.  *    than or equal to 263, or less than or 
  553.  *    equal to -263, a loss of significance 
  554.  *    in the result occurs, in which case the 
  555.  *    function generates a _TLOSS error and 
  556.  *    returns an indefinite (same as a quiet NaN).
  557.  *
  558.  *****************************************/
  559. DECLARE EXTERNAL FUNCTION sin 
  560.     DOUBLE PRECISION
  561.     RETURNS DOUBLE PRECISION BY VALUE
  562.     ENTRY_POINT 'IB_UDF_sin' MODULE_NAME 'ib_udf';
  563.  
  564. /*****************************************
  565.  *
  566.  *    s i n h
  567.  *
  568.  *****************************************
  569.  *
  570.  * Functional description:
  571.  *    Returns the hyperbolic sine of x. If x is greater 
  572.  *    than or equal to 263, or less than or 
  573.  *    equal to -263, a loss of significance 
  574.  *    in the result occurs, in which case the 
  575.  *    function generates a _TLOSS error and 
  576.  *    returns an indefinite (same as a quiet NaN).
  577.  *
  578.  *****************************************/
  579. DECLARE EXTERNAL FUNCTION sinh 
  580.     DOUBLE PRECISION
  581.     RETURNS DOUBLE PRECISION BY VALUE
  582.     ENTRY_POINT 'IB_UDF_sinh' MODULE_NAME 'ib_udf';
  583.  
  584. /*****************************************
  585.  *
  586.  *    s q r t
  587.  *
  588.  *****************************************
  589.  *
  590.  * Functional description:
  591.  *    Returns the square root of a number.
  592.  *
  593.  *****************************************/
  594. DECLARE EXTERNAL FUNCTION sqrt 
  595.     DOUBLE PRECISION
  596.     RETURNS DOUBLE PRECISION BY VALUE
  597.     ENTRY_POINT 'IB_UDF_sqrt' MODULE_NAME 'ib_udf';
  598.  
  599.  
  600. /*****************************************
  601.  *
  602.  *    s r a n d
  603.  *
  604.  *****************************************
  605.  *
  606.  * Functional description:
  607.  *    Seeds the random number generator using
  608.  *  the current time and returns the first
  609.  *  pseudo-random number (between 0 and 1)
  610.  *  in the new sequence.
  611.  *
  612.  * Note:
  613.  *  Two srand() calls performed within a second
  614.  *  will return the same value.
  615.  * 
  616.  *****************************************/
  617. DECLARE EXTERNAL FUNCTION srand 
  618.     RETURNS DOUBLE PRECISION BY VALUE
  619.     ENTRY_POINT 'IB_UDF_srand' MODULE_NAME 'ib_udf';
  620.  
  621.  
  622. /*****************************************
  623.  *
  624.  *    s u b s t r
  625.  *
  626.  *****************************************
  627.  *
  628.  * Functional description:
  629.  *    substr(s,m,n) returns the substring 
  630.  *    of s which starts at position m and
  631.  *    ending at position n.
  632.  *    Note: This function is NOT limited to
  633.  *    receiving and returning only 255 characters,
  634.  *    rather, it can use as long as 32767 
  635.  *     characters which is the limit on an 
  636.  *    INTERBASE character string.
  637.  *      Change by Claudio Valderrama: when n>length(s),
  638.  *      the result will be the original string instead
  639.  *      of NULL as it was originally designed.
  640.  *
  641.  *****************************************/
  642. DECLARE EXTERNAL FUNCTION substr 
  643.     CSTRING(255) NULL, SMALLINT, SMALLINT
  644.     RETURNS CSTRING(255) FREE_IT
  645.     ENTRY_POINT 'IB_UDF_substr' MODULE_NAME 'ib_udf';
  646.  
  647. /*****************************************
  648.  *
  649.  *    s u b s t r l e n
  650.  *
  651.  *****************************************
  652.  *
  653.  * Functional description:
  654.  *    substr(s,i,l) returns the substring 
  655.  *    of s which starts at position i and
  656.  *    ends at position i+l-1, being l the length.
  657.  *    Note: This function is NOT limited to
  658.  *    receiving and returning only 255 characters,
  659.  *    rather, it can use as long as 32767 
  660.  *     characters which is the limit on an 
  661.  *    INTERBASE character string.
  662.  *
  663.  *****************************************/
  664. DECLARE EXTERNAL FUNCTION substrlen 
  665.     CSTRING(255) NULL, SMALLINT, SMALLINT
  666.     RETURNS CSTRING(255) FREE_IT
  667.     ENTRY_POINT 'IB_UDF_substrlen' MODULE_NAME 'ib_udf';
  668.  
  669. /*****************************************
  670.  *
  671.  *    s t r l e n
  672.  *
  673.  *****************************************
  674.  *
  675.  * Functional description:
  676.  *    Returns the length of a given string.
  677.  *
  678.  *****************************************/
  679. DECLARE EXTERNAL FUNCTION strlen 
  680.     CSTRING(32767) CHARACTER SET NONE
  681.     RETURNS INTEGER BY VALUE
  682.     ENTRY_POINT 'IB_UDF_strlen' MODULE_NAME 'ib_udf';
  683.  
  684. /*****************************************
  685.  *
  686.  *    t a n
  687.  *
  688.  *****************************************
  689.  *
  690.  * Functional description:
  691.  *     Returns the tangent of x. If x is 
  692.  *    greater than or equal to 263, or less 
  693.  *    than or equal to -263, a loss of 
  694.  *    significance in the result occurs, in 
  695.  *    which case the function generates a 
  696.  *    _TLOSS error and returns an indefinite 
  697.  *    (same as a quiet NaN).
  698.  *
  699.  *****************************************/
  700. DECLARE EXTERNAL FUNCTION tan 
  701.     DOUBLE PRECISION
  702.     RETURNS DOUBLE PRECISION BY VALUE
  703.     ENTRY_POINT 'IB_UDF_tan' MODULE_NAME 'ib_udf';
  704.  
  705. /*****************************************
  706.  *
  707.  *    t a n h
  708.  *
  709.  *****************************************
  710.  *
  711.  * Functional description:
  712.  *     Returns the tangent of x. If x is 
  713.  *    greater than or equal to 263, or less 
  714.  *    than or equal to -263, a loss of 
  715.  *    significance in the result occurs, in 
  716.  *    which case the function generates a 
  717.  *    _TLOSS error and returns an indefinite 
  718.  *    (same as a quiet NaN).
  719.  *    
  720.  *****************************************/
  721. DECLARE EXTERNAL FUNCTION tanh 
  722.     DOUBLE PRECISION
  723.     RETURNS DOUBLE PRECISION BY VALUE
  724.     ENTRY_POINT 'IB_UDF_tanh' MODULE_NAME 'ib_udf';
  725.  
  726.